package com.ssy.lingxi.product.api.model.request.warehouse;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class InvoicesUpdataRequest {

    /**
     * 单据ID
     */
    @NotNull(message = "单据ID不能为空")
    private Long id;


    /**
     * 单据摘要
     */
    @NotEmpty(message = "单据摘要不能为空")
    private String invoicesAbstract;

    /**
     * 对应仓库ID
     */
    @NotNull(message = "对应仓库ID不能为空")
    private Long inventoryId;


    /**
     * 对应仓库人员
     */
    @NotEmpty(message = "对应仓库人员不能为空")
    private String inventoryRole;



    /**
     * 单据时间
     */
    @NotNull(message = "单据时间不能为空")
    private Long   transactionTime;


    /**
     * 单据明细
     */
    @Valid
    @NotEmpty(message = "商品不能为空")
    @Size(min = 1, message = "至少有一个商品")
    private List<InvoicesDetailsRequest> invoicesDetailsRequests;


}
